1. Field of the Invention
This invention relates to an image processing apparatus which obtains an image focused on an object.
2. Description of the Related Art
For example, a defect inspection is performed for large-size glass substrates and semiconductor wafers used for a liquid crystal display (hereinafter referred to as “LCD”) or a plasma display panel (hereinafter referred to as “PDP”). In the defect inspection thereof, image data is obtained by an image processing apparatus by taking images of large-size glass substrates and semiconductor wafers by an image-taking device such as a CCD camera. With respect to the image data, it is necessary to focus the image-taking device on large-size glass substrates and semiconductor wafers to improve the accuracy of the defect inspection.
As a method of obtaining focused image data, for example, an object such as a large-size glass substrate or a semiconductor wafer is placed on a stage, a CCD camera is arranged above the object so as to be opposed to the object, and the stage is moved in a Z-axis direction to focus the CCD camera on the object.
For example, the CCD camera is set to take an image each time step movement of the stage is stopped, and a plurality of image data are obtained.
A contrast of image data obtained by taking an image of the object becomes higher as the CCD camera is more focused on the object. Therefore, a device which controls the stage and the CCD camera retrieves image data having the highest contrast among the obtained plurality of image data, reads information of the height of the stage at which the image data was obtained, and controls the height of the stage in accordance with the height information. Thereby, the object on the stage is adjusted to the focus position of the CCD camera, and focused image data of the object is obtained.
In the field of manufacturing LCDs, PDPs or semiconductor wafers, there is a demand of shortening a tact time of manufacturing them. With the demand, it is also desired to shorten the time required for defect inspections for large-size glass substrates and semiconductor wafers, etc. used for LCDs or PDPs. Therefore, it is necessary to shorten time of obtaining the focused image data.
However, in the above method, the stage-and-CCD-camera controlling device is required to transmit to the stage a command to move the stage for each predetermined pitch, and transmit to the CCD camera a command to take an image, while checking the operation of the stage and the image-taking operation of the CCD camera. Further, together with these operations, the stage-and-CCD-camera controlling device is required to perform processing such as taking image data. Therefore, the stage-and-CCD-camera controlling device is required to perform enormous amounts of processing, and takes much time to obtain a plurality of image data.